package com.jr.dao;


import com.jr.entity.Address;

import java.util.List;

public interface AddressDao {
    /**
     * 新增地址
     * @param address
     * @return
     * @throws Exception
     */
    int addAddress(Address address)throws Exception;

    /**
     * 根据企业id查询所有地址
     * @param enterpriseId
     * @return
     * @throws Exception
     */
    List<Address> getAddress(Integer enterpriseId)throws Exception;

    /**
     * 根据id更新Exist状态 用作删除地址
     * @param addressId
     * @return
     * @throws Exception
     */
    int updateAddressExist(Integer addressId)throws Exception;

    /**
     * 根据id修改地址信息
     * @param address
     * @return
     * @throws Exception
     */
    int saveAddressById(Address address)throws Exception;

    /**
     * 根据id设置地址默认
     * @return
     * @throws Exception
     */
    int setAddressDefaultById(Integer addressId)throws Exception;
    /**
     * 将所有default_status都设置成普通状态
     * @return
     * @throws Exception
     */
    int setAllAddressDefault()throws Exception;

}
